using Simple.Contracts.Models.Common;using Simple.Contracts.Models.Common.Page;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Contracts.Models
{
    /// <summary>
    /// 公司列表输入参数
    /// </summary>
    public class CompanyListInput : PageInput
    {
        /// <summary>
        /// 公司名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        public string? Version { get; set; }
    }

    /// <summary>
    /// 公司信息Dto
    /// </summary>
    public class CompanyDto
    {
        /// <summary>
        /// 公司Id
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime VersionExpiryTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string VersionExpiryTimeText { get { return this.VersionExpiryTime.ToString("yyyy-MM-dd HH:mm"); } }

        /// <summary>
        /// 省份Id
        /// </summary>
        public short? ProvinceId { get; set; }

        /// <summary>
        /// 省份名称
        /// </summary>
        public string ProvinceName { get; set; }

        /// <summary>
        /// 城市Id
        /// </summary>
        public short? CityId { get; set; }

        /// <summary>
        /// 城市名称
        /// </summary>
        public string CityName { get; set; }

        /// <summary>
        /// 地区Id
        /// </summary>
        public short? AreaId { get; set; }

        /// <summary>
        /// 地区名称
        /// </summary>
        public string AreaName { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 联系人手机号
        /// </summary>
        public string ContactPhone { get; set; }

        /// <summary>
        /// 联系人姓名
        /// </summary>
        public string ContactName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string CreateTimeText { get { return this.CreateTime.ToString("yyyy-MM-dd HH:mm"); } }

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        public string UpdateTimeText { get { return this.UpdateTime.ToString("yyyy-MM-dd HH:mm"); } }
    }

    /// <summary>
    /// 保存公司信息输入参数
    /// </summary>
    public class CompanySaveInput
    {
        /// <summary>
        /// 公司Id（编辑时传入）
        /// </summary>
        public long? Id { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        public string Version { get; set; }

        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime VersionExpiryTime { get; set; }

        /// <summary>
        /// 省份Id
        /// </summary>
        public short? ProvinceId { get; set; }

        /// <summary>
        /// 省份名称
        /// </summary>
        public string ProvinceName { get; set; }

        /// <summary>
        /// 城市Id
        /// </summary>
        public short? CityId { get; set; }

        /// <summary>
        /// 城市名称
        /// </summary>
        public string CityName { get; set; }

        /// <summary>
        /// 地区Id
        /// </summary>
        public short? AreaId { get; set; }

        /// <summary>
        /// 地区名称
        /// </summary>
        public string AreaName { get; set; }

        /// <summary>
        /// 详细地址
        /// </summary>
        public string? Address { get; set; }

        /// <summary>
        /// 联系人手机号
        /// </summary>
        public string ContactPhone { get; set; }

        /// <summary>
        /// 联系人姓名
        /// </summary>
        public string ContactName { get; set; }
    }

    /// <summary>
    /// 修改公司版本输入参数
    /// </summary>
    public class UpdateCompanyVersionInput
    {
        /// <summary>
        /// 公司Id
        /// </summary>
        public long CompanyId { get; set; }

        /// <summary>
        /// 版本
        /// </summary>
        public string Version { get; set; }
    }

    /// <summary>
    /// 修改公司过期时间输入参数
    /// </summary>
    public class UpdateCompanyExpiryTimeInput
    {
        /// <summary>
        /// 公司Id
        /// </summary>
        public long CompanyId { get; set; }

        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime VersionExpiryTime { get; set; }
    }
}